gtk4.git
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 19 Mar 2021 05:44:39 +0000 (05:44 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!3317

5 years agotext tag: Typo fix
Matthias Clasen [Fri, 19 Mar 2021 00:30:29 +0000 (20:30 -0400)]
text tag: Typo fix

5 years agoCosmetics
Matthias Clasen [Fri, 19 Mar 2021 00:30:07 +0000 (20:30 -0400)]
Cosmetics

Remove a stale comment.

5 years agoCosmetics
Matthias Clasen [Fri, 19 Mar 2021 00:16:59 +0000 (20:16 -0400)]
Cosmetics

Pack the GtkTextAttributes struct better.

5 years agorelease script: Include gi-docgen
Matthias Clasen [Thu, 18 Mar 2021 23:44:21 +0000 (19:44 -0400)]
release script: Include gi-docgen

This lets us say 'you don't need to package this'
about gi-docgen.

5 years agoMerge branch 'ngl-by-default' into 'master'
Matthias Clasen [Fri, 19 Mar 2021 02:01:34 +0000 (02:01 +0000)]
Merge branch 'ngl-by-default' into 'master'

gsk: Make ngl the default OpenGL renderer

See merge request GNOME/gtk!3313

5 years agoMerge branch 'wip/chergert/fix-ngl-cache-eviction' into 'master'
Matthias Clasen [Fri, 19 Mar 2021 01:59:29 +0000 (01:59 +0000)]
Merge branch 'wip/chergert/fix-ngl-cache-eviction' into 'master'

fix ngl cache eviction

Closes #3771

See merge request GNOME/gtk!3316

5 years agongl: clear Glyph front cache at the beginning of a frame
Christian Hergert [Fri, 19 Mar 2021 00:54:48 +0000 (17:54 -0700)]
ngl: clear Glyph front cache at the beginning of a frame

We don't want to be responsible for duplicating the effort of the hash
table, we just want to speed up subsequent lookups. Otherwise, we risk
not marking glyph usage when tracking usage for compaction.

5 years agongl: implement atlas compaction
Christian Hergert [Fri, 19 Mar 2021 00:53:37 +0000 (17:53 -0700)]
ngl: implement atlas compaction

This required finishing up the begin_frame/end_frame semantics for
GskNglTextureLibraryw which was apparently overlooked.

The driver was changed to provide more information to the library when
beginning frames. We do not need to use end_frame so that was removed.

The frame age is the same as GL (60) but I do wonder if that is based
on seconds if we should be using something longer for situations where
we have higher frame rates.

Fixes #3771

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 18 Mar 2021 21:43:14 +0000 (21:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

inspector: Respect GDK_DEBUG=vulkan-disable

Closes #3748

See merge request GNOME/gtk!3312

5 years agoMerge branch 'bilelmoussaoui/4.2-annotations' into 'master'
Matthias Clasen [Thu, 18 Mar 2021 21:42:35 +0000 (21:42 +0000)]
Merge branch 'bilelmoussaoui/4.2-annotations' into 'master'

IMContext: add since annotations to the new APIs

See merge request GNOME/gtk!3315

5 years agoIMContext: add since annotations to the new APIs
Bilal Elmoussaoui [Thu, 18 Mar 2021 21:25:38 +0000 (22:25 +0100)]
IMContext: add since annotations to the new APIs

5 years agogsk: Make ngl the default OpenGL renderer
Matthias Clasen [Thu, 18 Mar 2021 03:27:41 +0000 (23:27 -0400)]
gsk: Make ngl the default OpenGL renderer

We will keep the original GL renderer around for
a while, to have an alternative. But we want to
get wider testing of the new renderer.

5 years agoMerge branch 'wip/chergert/fix-3770' into 'master'
Matthias Clasen [Thu, 18 Mar 2021 17:55:26 +0000 (17:55 +0000)]
Merge branch 'wip/chergert/fix-3770' into 'master'

ngl: ensure vertices buffer allocates enough vertices

Closes #3770

See merge request GNOME/gtk!3314

5 years agongl: ensure vertices buffer allocates enough vertices
Christian Hergert [Thu, 18 Mar 2021 17:43:24 +0000 (10:43 -0700)]
ngl: ensure vertices buffer allocates enough vertices

It's not guaranteed that a single power of two growth will be enough.

Fixes #3770

5 years agoCosmetics
Matthias Clasen [Thu, 18 Mar 2021 04:14:25 +0000 (00:14 -0400)]
Cosmetics

Pango lets us pass NULL for the font desc and language
in pango_context_get_font_metrics() to use the context
values.

5 years agoinspector: Respect GDK_DEBUG=vulkan-disable
Matthias Clasen [Thu, 18 Mar 2021 03:19:08 +0000 (23:19 -0400)]
inspector: Respect GDK_DEBUG=vulkan-disable

Respect the debug settings for disabling Vulkan or GL,
and do not try to initialize those contexts. This can
be necessary to work around crashes.

Fixes: #3748
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 18 Mar 2021 00:31:10 +0000 (00:31 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3765

See merge request GNOME/gtk!3311

5 years agolabel: Fix tooltips on links
Matthias Clasen [Wed, 17 Mar 2021 22:16:47 +0000 (18:16 -0400)]
label: Fix tooltips on links

Fix pointed out by Timm Baeder.

Fixes: #3765
5 years agomedia: Always use GL with gstreamer
Matthias Clasen [Wed, 17 Mar 2021 20:26:40 +0000 (16:26 -0400)]
media: Always use GL with gstreamer

As long as we can create a GL context, pass one to
gstreamer. This at least gets us GL textures with
the ngl renderer, the previous code was arbitrarily
refusing that.

5 years agoMerge branch 'gsk-border-node-diff-fix-typo' into 'master'
Timm Bäder [Wed, 17 Mar 2021 16:04:57 +0000 (16:04 +0000)]
Merge branch 'gsk-border-node-diff-fix-typo' into 'master'

Fix a typo in gsk_border_node_diff

See merge request GNOME/gtk!3310

5 years agoFix a typo in gsk_border_node_diff
Andrey Kozlovskiy [Wed, 17 Mar 2021 15:38:01 +0000 (15:38 +0000)]
Fix a typo in gsk_border_node_diff

Typo was introduced in !3278 and results in an incorrect handling of different uniformity.

5 years agoMerge branch 'select-list-model-null' into 'master'
Emmanuele Bassi [Wed, 17 Mar 2021 14:09:37 +0000 (14:09 +0000)]
Merge branch 'select-list-model-null' into 'master'

gtk: Allow selection models to take null list model during construction

See merge request GNOME/gtk!3309

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Wed, 17 Mar 2021 12:32:45 +0000 (12:32 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3763

See merge request GNOME/gtk!3308

5 years agolpr: Fix various compiler warnings
Matthias Clasen [Wed, 17 Mar 2021 11:56:07 +0000 (07:56 -0400)]
lpr: Fix various compiler warnings

gcc 11 is warning about some const mixups here.
Fix them.

5 years agotreestore: Initialize some local variables
Matthias Clasen [Wed, 17 Mar 2021 11:51:27 +0000 (07:51 -0400)]
treestore: Initialize some local variables

gcc 11 is warning that these might be used uninitialized
otherwise.

5 years agosizerequest: Avoid a corner case
Matthias Clasen [Wed, 17 Mar 2021 11:50:24 +0000 (07:50 -0400)]
sizerequest: Avoid a corner case

gcc 11 warns that the code isn't safe when
n_requested_sizes is 0. Add a precondition check
to make it clear that that never happens.

5 years agocssshadowvalue: Handle error condition propertly
Matthias Clasen [Wed, 17 Mar 2021 11:49:06 +0000 (07:49 -0400)]
cssshadowvalue: Handle error condition propertly

We were parsing off the end of our array before noticing
that we've gone too far. gcc 11 warns about this.

5 years agocheckbutton: Add a warning about cyclic groups
Matthias Clasen [Wed, 17 Mar 2021 11:37:33 +0000 (07:37 -0400)]
checkbutton: Add a warning about cyclic groups

Setting up check or toggle button group relationships
in a cycle will lead to lockups. Add a warning about
this, and catch the simplest case with a precondition
check.

Fixes: #3763
5 years agoDrop the gtk-doc subproject
Matthias Clasen [Tue, 16 Mar 2021 21:22:45 +0000 (17:22 -0400)]
Drop the gtk-doc subproject

No longer used.

5 years agoUpdate Hungarian translation
Balázs Úr [Tue, 16 Mar 2021 23:49:27 +0000 (23:49 +0000)]
Update Hungarian translation

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 16 Mar 2021 19:12:05 +0000 (19:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

dnd: Add some warnings to the docs

See merge request GNOME/gtk!3305

5 years agodnd: Add some warnings to the docs
Matthias Clasen [Tue, 16 Mar 2021 18:24:04 +0000 (14:24 -0400)]
dnd: Add some warnings to the docs

Add some warnings about pitfalls of the async dnd api.

5 years agoMerge branch 'kjellahl/cairo-subproject' into 'master'
Matthias Clasen [Tue, 16 Mar 2021 11:43:06 +0000 (11:43 +0000)]
Merge branch 'kjellahl/cairo-subproject' into 'master'

Fix build when cairo is a subproject

See merge request GNOME/gtk!3304

5 years agomeson: Find libcairo-script-interpreter when cairo is a subproject
Kjell Ahlstedt [Tue, 16 Mar 2021 08:52:13 +0000 (09:52 +0100)]
meson: Find libcairo-script-interpreter when cairo is a subproject

If cairo is a subproject, it's not necessarily installed when gtk
is built. In the build tree, libcairo-script-interpreter is not stored
in the same directory as other cairo libraries.

5 years agogdkglcontext-x11: Don't assume that cairo-xlib.h is in cairo directory
Kjell Ahlstedt [Tue, 16 Mar 2021 08:51:40 +0000 (09:51 +0100)]
gdkglcontext-x11: Don't assume that cairo-xlib.h is in cairo directory

If cairo is a subproject, it's not necessarily installed when gtk
is built. In the source tree, cairo's headers are not stored in
a directory called 'cairo'.

5 years agoMerge branch 'fix-3581' into 'master'
Matthias Clasen [Mon, 15 Mar 2021 22:32:23 +0000 (22:32 +0000)]
Merge branch 'fix-3581' into 'master'

gdkcursor-win32.c: Add cursor map for all-scroll (issue #3581)

Closes #3581

See merge request GNOME/gtk!3298

5 years agoMerge branch 'fix-wayland-layout-changes' into 'master'
Matthias Clasen [Mon, 15 Mar 2021 22:31:08 +0000 (22:31 +0000)]
Merge branch 'fix-wayland-layout-changes' into 'master'

Fix wayland layout changes

See merge request GNOME/gtk!3303

5 years agowayland: Fix cross-layout accelerators
Matthias Clasen [Mon, 15 Mar 2021 19:23:00 +0000 (15:23 -0400)]
wayland: Fix cross-layout accelerators

GTK traditionally lets you activate keyboard shortcuts
even if they are for a non-active layout. But it is meant
to only activate with a keysym from a non-active layout
when that symbol is not present in the current layout.
That last condition was lost when key event handling
was redone for GTK4. Bring it back.

5 years agowayland: Add debug spew for active keyboard layouts
Matthias Clasen [Mon, 15 Mar 2021 16:55:44 +0000 (12:55 -0400)]
wayland: Add debug spew for active keyboard layouts

Print out what we think the active keyboard layout is,
when it changes, with GDK_DEBUG=input.

5 years agogtk: Allow selection models to take null list model during construction
Jason Francis [Mon, 15 Mar 2021 13:30:33 +0000 (09:30 -0400)]
gtk: Allow selection models to take null list model during construction

This brings it in line with the documentation, and with the respective
set_model() functions.

5 years agoMerge branch 'issue-3757' into 'master'
Matthias Clasen [Mon, 15 Mar 2021 19:28:17 +0000 (19:28 +0000)]
Merge branch 'issue-3757' into 'master'

docs: Update annotations for WidgetClass.query_action()

Closes #3757

See merge request GNOME/gtk!3301

5 years agowayland: Emit keys-changed on layout changes
Matthias Clasen [Mon, 15 Mar 2021 16:34:23 +0000 (12:34 -0400)]
wayland: Emit keys-changed on layout changes

We were forgetting to do this in when layout changes are
communicated via handle_modifiers.

5 years agodocs: Update annotations for WidgetClass.query_action()
Emmanuele Bassi [Mon, 15 Mar 2021 13:48:35 +0000 (13:48 +0000)]
docs: Update annotations for WidgetClass.query_action()

The parameter_type and property_name out arguments can be set to NULL.

Fixes: #3757
5 years agoUpdate Italian translation
Milo Casagrande [Mon, 15 Mar 2021 09:25:11 +0000 (09:25 +0000)]
Update Italian translation

(cherry picked from commit affeff5472868b797b6ab16a9ffa6cab74148106)

5 years agogdkcursor-win32.c: Add cursor map for all-scroll
Chun-wei Fan [Mon, 15 Mar 2021 09:04:21 +0000 (17:04 +0800)]
gdkcursor-win32.c: Add cursor map for all-scroll

This makes sure that we don't have cursors disappearing on Windows upon
scrolling because we can't find a cursor that exists on the system during
a scroll, and unlike GTK-3.x, we do not default to the arrow pointer on GTK4.

Just mimic what we have on X11 and Wayland: the trusty standard arrow pointer.

Fixes issue #3581.

5 years agorelease-script: Actually compress the docs tarball
Matthias Clasen [Mon, 15 Mar 2021 03:33:10 +0000 (23:33 -0400)]
release-script: Actually compress the docs tarball

Somehow an x got lot and the tarball got very big. Oops...

5 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Mon, 15 Mar 2021 02:31:45 +0000 (02:31 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

Wip/otte/for master

See merge request GNOME/gtk!3297

5 years agox11: Don't call _gdk_surface_update_size() all the time
Benjamin Otte [Mon, 15 Mar 2021 02:16:50 +0000 (03:16 +0100)]
x11: Don't call _gdk_surface_update_size() all the time

We were calling _gdk_surface_update_size() every frame, even if the
window size didn't change. This would cause us to discard all cached
buffers and redraw the whole screen.

This was BAD.

5 years agosurface: Remove unused gdk_surface_get_unscaled_size()
Benjamin Otte [Mon, 15 Mar 2021 01:56:28 +0000 (02:56 +0100)]
surface: Remove unused gdk_surface_get_unscaled_size()

Also remove unscaled_width/height members in the win32 backend.

Both of those are unused.

5 years ago4.1.2
Matthias Clasen [Sun, 14 Mar 2021 23:13:10 +0000 (19:13 -0400)]
4.1.2

5 years agoUpdate release script
Matthias Clasen [Mon, 15 Mar 2021 01:35:44 +0000 (21:35 -0400)]
Update release script

With gi-docgen based docs, we can try to go back to
including the docs in the main release tarball.

5 years agoMerge branch 'menubar-accel' into 'master'
Matthias Clasen [Mon, 15 Mar 2021 01:27:45 +0000 (01:27 +0000)]
Merge branch 'menubar-accel' into 'master'

window: Add a way to disable F10 shortcut

Closes #3727

See merge request GNOME/gtk!3296

5 years agongl: Remove duplicate check
Benjamin Otte [Tue, 9 Mar 2021 20:05:49 +0000 (21:05 +0100)]
ngl: Remove duplicate check

We check the extents, so there's no need to check overlap before.

5 years agowindow: Add a way to disable F10 shortcut
Matthias Clasen [Sun, 14 Mar 2021 23:37:11 +0000 (19:37 -0400)]
window: Add a way to disable F10 shortcut

This is needed for terminal emulators.

Fixes: #3727
5 years agoMerge branch 'ngl-less-shaders' into 'master'
Matthias Clasen [Sun, 14 Mar 2021 21:04:37 +0000 (21:04 +0000)]
Merge branch 'ngl-less-shaders' into 'master'

Assorted ngl improvements

See merge request GNOME/gtk!3295

5 years agongl: Special-case css backgrounds
Matthias Clasen [Sun, 14 Mar 2021 04:30:18 +0000 (23:30 -0500)]
ngl: Special-case css backgrounds

Recognize a common pattern: A rounded clip with
a color node, followed by a border node, with the
same outline. This is what CSS backgrounds frequently
produce, and we can render it more efficiently with
a combined shader.

5 years agongl: Don't bother with uniform border nodes
Matthias Clasen [Sat, 13 Mar 2021 23:40:37 +0000 (18:40 -0500)]
ngl: Don't bother with uniform border nodes

Now that colors aren't uniforms anymore, we don't
win much by using the inset_shadow shader. The fragment
shaders of inset_shadow and border are identical. And
the regular border setup does nine-slicing.

5 years agongl: Small shader improvements
Matthias Clasen [Sat, 13 Mar 2021 23:21:45 +0000 (18:21 -0500)]
ngl: Small shader improvements

Add a variant of gskSetOutputColor that saves a
few multiplications, and use it where possible.

5 years agongl: Improve the coloring shader
Matthias Clasen [Sat, 13 Mar 2021 23:04:26 +0000 (18:04 -0500)]
ngl: Improve the coloring shader

Since we are now passing a float anyway, we can avoid
the branch in the fragment shader.

5 years agongl: Improve the gradient shaders
Matthias Clasen [Sat, 13 Mar 2021 22:54:15 +0000 (17:54 -0500)]
ngl: Improve the gradient shaders

Use a define for MAX_COLOR_STOPS, and give the loop
a fixed limit.

5 years agongl: Rewrite gsk_ngl_render_job_visit_text_node
Matthias Clasen [Sat, 13 Mar 2021 19:36:03 +0000 (14:36 -0500)]
ngl: Rewrite gsk_ngl_render_job_visit_text_node

Make this more compact, and thus easier to read.

5 years agongl: Drop gsk_ngl_render_job_set_color
Matthias Clasen [Sat, 13 Mar 2021 19:29:34 +0000 (14:29 -0500)]
ngl: Drop gsk_ngl_render_job_set_color

Colors are not state that we carry across draw ops,
so setting the color on the render job doesn't make
much sense. Instead, pass the color to the various
draw calls. Add a few new ones for that purpose.

Also, shorten the names of some by going from
'load_vertices_from_offscreen' to 'draw_offscreen'.

5 years agongl: Refactor gsk_ngl_render_job_visit_border_node
Matthias Clasen [Sat, 13 Mar 2021 18:40:04 +0000 (13:40 -0500)]
ngl: Refactor gsk_ngl_render_job_visit_border_node

With color sorting out of the picture, this can
be much simpler.

5 years agongl: Consistently use gsk_scaled_premultiply
Matthias Clasen [Sat, 13 Mar 2021 15:17:34 +0000 (10:17 -0500)]
ngl: Consistently use gsk_scaled_premultiply

Its not going to make much of a difference, but we
can just as well be consistent.

5 years agongl: Fix up uniform enums
Matthias Clasen [Sun, 14 Mar 2021 04:38:54 +0000 (23:38 -0500)]
ngl: Fix up uniform enums

This got messed up when color was changed from
a uniform to an attribute in 06d5c8e72dee3d6339.

5 years agoUpdate Finnish translation
Jiri Grönroos [Sun, 14 Mar 2021 17:02:46 +0000 (17:02 +0000)]
Update Finnish translation

(cherry picked from commit f5a34b53afed6f75a257c21dc52b07592ea76681)

5 years agoUpdate French translation
Guillaume Bernard [Sun, 14 Mar 2021 13:37:57 +0000 (13:37 +0000)]
Update French translation

(cherry picked from commit 21039681d6df9824599d186934aaa53fd4ba722f)

5 years agoUpdate Polish translation
Piotr Drąg [Sun, 14 Mar 2021 12:30:26 +0000 (13:30 +0100)]
Update Polish translation

5 years agoUpdated Czech translation
Marek Černocký [Sun, 14 Mar 2021 08:28:17 +0000 (09:28 +0100)]
Updated Czech translation

5 years agoMerge branch 'gles-coloring' into 'master'
Matthias Clasen [Sat, 13 Mar 2021 22:27:04 +0000 (22:27 +0000)]
Merge branch 'gles-coloring' into 'master'

ngl: Fix the coloring shader on GLES 2.0

See merge request GNOME/gtk!3294

5 years agongl: Fix the coloring shader on GLES 2.0
Emmanuel Gil Peyrot [Sat, 13 Mar 2021 22:00:54 +0000 (22:00 +0000)]
ngl: Fix the coloring shader on GLES 2.0

Integer varyings didn’t exist in GLSL ES 1.00, neither did the flat
attribute.

5 years agoUpdate Norwegian Bokmål translation
Kjartan Maraas [Sat, 13 Mar 2021 16:04:48 +0000 (16:04 +0000)]
Update Norwegian Bokmål translation

(cherry picked from commit 70ee21db71e5b8de0aff406d3d9f1decddebfa09)

5 years agoMerge branch 'ebassi/for-master' into 'master'
Matthias Clasen [Sat, 13 Mar 2021 12:36:56 +0000 (12:36 +0000)]
Merge branch 'ebassi/for-master' into 'master'

docs: Fix the dependencies links

See merge request GNOME/gtk!3284

5 years agoMerge branch 'ngl-textview-cursor' into 'master'
Matthias Clasen [Sat, 13 Mar 2021 12:33:15 +0000 (12:33 +0000)]
Merge branch 'ngl-textview-cursor' into 'master'

Ngl textview cursor

See merge request GNOME/gtk!3292

5 years agotextview: Fix blinking block cursors
Matthias Clasen [Sat, 13 Mar 2021 00:44:31 +0000 (19:44 -0500)]
textview: Fix blinking block cursors

When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.

5 years agotextview: Fix blinking block cursors
Matthias Clasen [Sat, 13 Mar 2021 00:44:31 +0000 (19:44 -0500)]
textview: Fix blinking block cursors

When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.

5 years agotextlayout: Render cursors at the end
Matthias Clasen [Sat, 13 Mar 2021 00:28:36 +0000 (19:28 -0500)]
textlayout: Render cursors at the end

Don't place the insertion cursor render nodes in the
middle of the text nodes for all the text. This helps
the renderer batching the text draw calls together.

5 years agongl: Fix up some debug printouts
Matthias Clasen [Fri, 12 Mar 2021 23:26:15 +0000 (18:26 -0500)]
ngl: Fix up some debug printouts

5 years agoMerge branch 'wip/chergert/fewer-uniforms' into 'master'
Matthias Clasen [Fri, 12 Mar 2021 22:55:00 +0000 (22:55 +0000)]
Merge branch 'wip/chergert/fewer-uniforms' into 'master'

ngl: apply fewer uniforms

See merge request GNOME/gtk!3289

5 years agoMerge branch 'pgriffis/readme-fixes' into 'master'
Matthias Clasen [Fri, 12 Mar 2021 22:51:16 +0000 (22:51 +0000)]
Merge branch 'pgriffis/readme-fixes' into 'master'

readme: Fix broken doc links

See merge request GNOME/gtk!3291

5 years agoreadme: Fix broken doc links
Patrick Griffis [Fri, 12 Mar 2021 22:02:55 +0000 (22:02 +0000)]
readme: Fix broken doc links

5 years agoMerge branch 'ngl-vertex-attributes' into 'master'
Matthias Clasen [Fri, 12 Mar 2021 21:26:52 +0000 (21:26 +0000)]
Merge branch 'ngl-vertex-attributes' into 'master'

Ngl vertex attributes

See merge request GNOME/gtk!3290

5 years agongl: Identify shaders
Matthias Clasen [Fri, 12 Mar 2021 19:25:05 +0000 (14:25 -0500)]
ngl: Identify shaders

Add a comment with a name to each shader. That makes
identifying the shaders in apitrace much easier.

5 years agongl: reintroduce comparison checks
Christian Hergert [Fri, 12 Mar 2021 19:47:15 +0000 (11:47 -0800)]
ngl: reintroduce comparison checks

This reduces how many changes we make when recording uniform state, which
increases the chances that the data offset will be the same when applying
uniforms.

5 years agongl: add front cache to reduce uniform changes
Christian Hergert [Fri, 12 Mar 2021 18:16:52 +0000 (10:16 -0800)]
ngl: add front cache to reduce uniform changes

Since we make full snapshots when recording uniform state of batches, we
need to perform some deduplication to avoid so many repeated uniform calls.

This uses a closed hashtable to determine if we are likely changing the
value to something new.

This does not currently compare values, it instead only compares that we
are going to point at a new offset into the uniform buffer. We could go
further if we compare upon updating values (we did that early on in the
prototype) so that offsets are less likely to be changed.

5 years agogtk-demo: Add a test for scrolling with Emoji
Matthias Clasen [Fri, 12 Mar 2021 06:44:05 +0000 (01:44 -0500)]
gtk-demo: Add a test for scrolling with Emoji

Make a text with lots of Emoji and text. This
is exercising the GL renderers switching between
different shaders for color and plain glyphs.

5 years agongl: Make the coloring shader more versatile
Matthias Clasen [Fri, 12 Mar 2021 06:27:19 +0000 (01:27 -0500)]
ngl: Make the coloring shader more versatile

When the color passed is transparent black, use
the color from the texture as source, instead of
as mask. This lets use use the coloring program
both for regular and color glyphs, avoiding
program changes in text with Emoji.

5 years agongl: Set color as vertex attribute
Matthias Clasen [Fri, 12 Mar 2021 00:46:15 +0000 (19:46 -0500)]
ngl: Set color as vertex attribute

Instead of using uniforms for color used in multiple
programs, pass it as vertex attributes. This will let
us batch more draw calls, since we don't have to change
uniforms so often. In particular, for syntax-highlighted
text.

5 years agogsk: Give ngl its own shader sources
Matthias Clasen [Fri, 12 Mar 2021 02:31:31 +0000 (21:31 -0500)]
gsk: Give ngl its own shader sources

We may want to change the interface between the
shaders and the renderer for ngl, and therefore,
sharing the shaders between gl and ngl will not
be practical, going forward.

5 years agoMerge branch 'fix-3704' into 'master'
Matthias Clasen [Fri, 12 Mar 2021 14:06:33 +0000 (14:06 +0000)]
Merge branch 'fix-3704' into 'master'

gdksurface-win32.c: Fix window menu positioning (issue #3704)

Closes #3704

See merge request GNOME/gtk!3286

5 years agobuild: Install the API references
Emmanuele Bassi [Fri, 12 Mar 2021 11:13:54 +0000 (11:13 +0000)]
build: Install the API references

We are building them, but not installing them.

5 years agodocs: Fix the dependencies links
Emmanuele Bassi [Thu, 11 Mar 2021 17:36:36 +0000 (17:36 +0000)]
docs: Fix the dependencies links

Use the GitLab pages location until we can link to a proper space on
developer.gnome.org.

5 years agogdksurface-win32.c: Fix window menu positioning
Chun-wei Fan [Fri, 12 Mar 2021 10:39:04 +0000 (18:39 +0800)]
gdksurface-win32.c: Fix window menu positioning

We ought to get the coordinates of where the window menu should be
displayed using gdk_win32_surface_get_root_coords(), instead of rounding
the position that we obtained with gdk_event_get_position().

Also rename items a bit in the same function, and call
gdk_event_get_event_type() for consistency with the other backends.

Fixes issue #3704.

5 years agoUpdate Korean translation
Changwoo Ryu [Fri, 12 Mar 2021 08:50:28 +0000 (08:50 +0000)]
Update Korean translation

(cherry picked from commit 7774d5d85e86f97d9ef7195c808bcd2d88ef49eb)

5 years agoMerge branch 'bilelmoussaoui/shortcuts-annotation' into 'master'
Emmanuele Bassi [Thu, 11 Mar 2021 18:40:32 +0000 (18:40 +0000)]
Merge branch 'bilelmoussaoui/shortcuts-annotation' into 'master'

g-i: fix gtk_shortcut_label_new annotation

See merge request GNOME/gtk!3285

5 years agog-i: fix gtk_shortcut_label_new annotation
Bilal Elmoussaoui [Thu, 11 Mar 2021 18:21:56 +0000 (18:21 +0000)]
g-i: fix gtk_shortcut_label_new annotation

5 years agoMerge branch 'ebassi/gidocgen' into 'master'
Emmanuele Bassi [Thu, 11 Mar 2021 17:11:57 +0000 (17:11 +0000)]
Merge branch 'ebassi/gidocgen' into 'master'

Move API reference to gi-docgen

See merge request GNOME/gtk!3222

5 years agodocs: Add URL maps for cross links
Emmanuele Bassi [Thu, 11 Mar 2021 16:46:02 +0000 (16:46 +0000)]
docs: Add URL maps for cross links

5 years agodocs: Enable search
Emmanuele Bassi [Thu, 11 Mar 2021 16:36:48 +0000 (16:36 +0000)]
docs: Enable search